<template>
  <el-dialog
    class="dia-style"
    :title="title"
    :visible.sync="open"
    width="700px"
    :modal-append-to-body="false"
    @close="cancel"
  >
    <!-- 表格 -->
    <hk-table
      :table-columns="tableTitle"
      :table-data="tableList"
      :show-index="true"
      :total="total"
      :query-params="queryParams"
      :table-height="250"
      :show-pag="false"
      @changePage="getDataList"
    />
    <div slot="footer" class="dialog-footer">
      <!-- <el-button type="primary" @click="submitForm">保 存</el-button> -->
      <el-button @click="cancel">取 消</el-button>
    </div>
  </el-dialog>
</template>
<script>
import HkTable from '@/components/Hk-Table'
export default {
  components: { HkTable },
  props: {
    title: {
      type: String,
      default() {
        return '默认列表'
      }
    }
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
      checked: false,
      total: 10,
      queryParams: {
        current: 1,
        size: 10
      },
      // 表格
      tableTitle: [
        { label: '白名单值', param: 'name' }
        // { label: '操作', param: 'operate', type: 'slot', width: '160px' }
      ],
      tableList: []
    }
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    show(data) {
      this.open = true
      this.tableList=data.map(i=>{
        return {name:i}
      })
    },
    getDataList() {},
    handleReset() {},
    // 取消按钮
    cancel() {
      this.open = false
      this.tableList=[]
    }
  }
}
</script>

  <style scoped lang="scss">
  // .el-dialog__body{
  // padding-top: 0px !important;
  // }
  .el-radio-group {
    margin: 10px 0;
  }
  .targetTable {
    flex: 1;
    overflow: auto;
  }
  .list-box {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    .el-tree {
      width: 220px;
      overflow: auto;
      margin-right: 20px;
      padding: 20px;
      border-right: 1px solid rgba(0, 0, 0, 0.08);
    }
  }
  ::v-deep {
    .el-dialog__body {
      height: 500px;
      display: flex;
      flex-direction: column;
      padding: 0 20px !important;
    }
    .el-form-item {
      margin-bottom: 0 !important;
    }
    .content {
      margin: 0;
      padding-bottom: 0px;
    }
    //   .content[data-v-307320bc] {
    //   }
  }
  </style>

